<?php
/**
 * 
 * @author nhan
 *
 */
class Model_Category extends Model_AbstractModel{
	private $name;
	private $orderIndex;
	
	public function __construct($data) {
		parent::__construct($data);
		if (is_array ( $data )) {
			
			if (isset ( $data ['name'] )) {
				$this->name = $data ['name'];
			}
			
			if (isset ( $data ['order_index'] )) {
				$this->orderIndex = $data ['order_index'];
			}
		}
	}
	
	/**
	 * (non-PHPdoc)
	 * @see Model_AbstractModel::toArray()
	 */
	public function toArray() {
		$arr = parent::toArray();
		$arr['name'] = $this->name;
		$arr['order_index'] = $this->orderIndex;
		return $arr;
	}
	
	public function getName() {
		return $this->name;
	}
	
	public function setName($x) {
		$this->name = $x;
	}
	
	public function getOrderIndex() {
		return $this->orderIndex;
	}
	public function setOrderIndex($x) {
		$this->orderIndex = $x;
	}
	
}